package com.test.javase;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/5/17
 * 1.请设计代码，实现单例模式
 */
public class Singleton {
    private static Singleton instance;
    private Singleton() {}
    public static Singleton getInstance() {
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }
}
